<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="description" content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
    <meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
    <meta name="author" content="Sergey Pimenov and Metro UI CSS contributors">

    <link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
    <title>Charms :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style</title>

    <link href="css/metro.css" rel="stylesheet">
    <link href="css/metro-icons.css" rel="stylesheet">
    <link href="css/metro-responsive.css" rel="stylesheet">
    <link href="css/metro-schemes.css" rel="stylesheet">

    <link href="css/docs.css" rel="stylesheet">

    <script src="js/jquery-2.1.3.min.js"></script>
    <script src="js/metro.js"></script>
    <script src="js/docs.js"></script>
    <script src="js/prettify/run_prettify.js"></script>
    <script src="js/ga.js"></script>
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

    <script>
        function showCharm(id){
            var  charm = $("#"+id+"-charm").data("charm");
            if (charm.element.data("opened") === true) {
                charm.close();
            } else {
                charm.open();
            }
        }
    </script>

</head>
<body>
    <div class="container page-content">
        <h1><a href="index.html" class="nav-button transform"><span></span></a>&nbsp;Charms</h1>

        @@adsense

        <div data-role="charm" data-position="top" id="top-charm"><h1 class="text-light">Top charm</h1></div>
        <div data-role="charm" data-position="bottom" id="bottom-charm"><h1 class="text-light">Bottom charm</h1></div>
        <div data-role="charm" data-position="left" id="left-charm"><h1 class="text-light">Left charm</h1></div>
        <div data-role="charm" data-position="right" id="right-charm"><h1 class="text-light">Right charm</h1></div>

        <div class="example" data-text="example">
            <div class="padding20 align-center">
                <button class="button" onclick="showCharm('left')">Left side</button>
                <button class="button" onclick="showCharm('right')">Right side</button>
                <button class="button" onclick="showCharm('top')">Top side</button>
                <button class="button" onclick="showCharm('bottom')">Bottom side</button>
            </div>
        </div>

        <div class="example" data-text="code">
            <h5>Definition</h5>
            <pre class="prettyprint linenums no-scroll"><code>
                &lt;div data-role="charm"&gt;
                    ...charm content...
                &lt;/div&gt;
            </code></pre>

            <h5>Position</h5>
            <pre class="prettyprint linenums no-scroll"><code>
                &lt;div data-role="charm" data-position="left|right|top|bottom"&gt;
                    ...charm content...
                &lt;/div&gt;
            </code></pre>

            <h5>Execute</h5>
            <pre class="prettyprint linenums no-scroll"><code>
                function showCharm(id){
                    var  charm = $(id).data("charm");
                    if (charm.element.data("opened") === true) {
                        charm.close();
                    } else {
                        charm.open();
                    }
                }
            </code></pre>
        </div>

    </div>

    @@hit

</body>
</html>